import ls from './local-storage';
import { STORAGE_TOKEN_KEY } from '@/store/mutation-type';
import { globalFactory } from '@/components/factory-select/factory-config';

export const logout = () => {
  ls.set(STORAGE_TOKEN_KEY, '');
}
export const getToken = (): string => {
  return ls.get(STORAGE_TOKEN_KEY);
}
export const setUserFactory = (factoryCode: string) => {
  globalFactory.factoryCode = factoryCode;
}
export const getUserFactory = (): string => {
  return globalFactory.factoryCode;
}
